


var mongoose = require('mongoose');

var blogSchema = new mongoose.Schema({
    name:  String,
    ip_addr: String,
    host_groups:   String,
    templates: [{ body: String, date: Date }],
    monitored_by_choices: {
        agent: "Agent",
        snmp:  "SNMP",
        wget: "wget" 
    }

    monitored_by = monitored_by_choices,
    remark: String
});

blogSchema.methods.displayBody = function () {
    return '内容:'+(this.body);
};

var Blog = mongoose.model('Blog',blogSchema);

module.exports = Blog;